  public function executeDelete(sfWebRequest $request)
  {
    $request->checkCSRFProtection();

    $this->dispatcher->notify(new sfEvent($this, 'admin.delete_object', array('object' => $this->getRoute()->getObject())));

	$con = Propel::getConnection();

	try {
	     //abrimos la transacción
	     $con->beginTransaction();

	     //operaciones pertinentes contra la base de datos
	     $this->getRoute()->getObject()->delete();

	     //si todo va bien guardamos los cambios
	     $con->commit();
	     $this->getUser()->setFlash('notice', 'The item was deleted successfully.');
	} catch (Exception $e) {

	     // Hacemos rollback de los cambios en caso de fallo
	     $con->rollback();
	     //devolvemos el error al depurador
	     //$this->getUser()->setFlash('error', 'The item cannot been deleted successfully due some errors.');
	     $this->getUser()->setFlash('error', 'El ítem no ha podido ser borrado, tiene relaciones con otros elementos.');
	}

    $this->redirect('@<?php echo $this->getUrlForAction('list') ?>');
  }
